package com.itlong.cloud.equip.operate;

import com.itlong.cloud.POJO.DTO.operate.OperateDeviceInfoGetPageDTO;
import com.itlong.cloud.POJO.DTO.operate.OperateHardwareDeviceUpdateDTO;
import com.itlong.cloud.POJO.DTO.operate.OperateHardwareProjectGetPageDTO;
import com.itlong.cloud.POJO.VO.operate.OperateDeviceInfoVO;
import com.itlong.cloud.POJO.VO.operate.OperateProjectInfoVO;
import com.itlong.cloud.POJO.VO.operate.OperateUpdateInfoVO;
import com.itlong.cloud.POJO.VO.property.PropertyProjectUnitInfoVO;
import com.itlong.cloud.utils.page.Page;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * <desc>
 *     运营-固件升级-设备升级服务接口暴露。
 * <desc/>
 *
 * @createDate 2018/08/27.
 */
@FeignClient(name = "equip-service")
public interface IOperateHardwareServiceClient {

    /**
     * <desc>
     *      分页获取安装包信息。
     * <desc/>
     *
     * @param  operateUpdateInfoGetPageDTO 参数请求对象
     * @return
     * @author Qiang.S
     * @createDate 2018/08/27
     */
    @RequestMapping(path = "/operate/upgrade/hardware/getDeviceInfoPage" ,method = RequestMethod.POST)
    Page<OperateDeviceInfoVO> getDeviceInfoPage(@RequestBody OperateDeviceInfoGetPageDTO operateUpdateInfoGetPageDTO) throws Exception;

    /**
     * <desc>
     *      根据项目编号获取设备更新时间
     * <desc/>
     *
     * @param projectId 项目编号
     * @return
     * @author Qiang.S
     * @createDate 2018-09-04
     */
    @RequestMapping(path = "/operate/upgrade/hardware/getUpgradeTimeByProjectId" ,method = RequestMethod.POST)
    String getUpgradeTimeByProjectId(@RequestParam("projectId")String projectId) throws Exception;

    /**
     * <desc>
     *      按条件分页获取项目列表
     * <desc/>
     *
     * @param operateHardwareProjectGetPageDTO 查询参数DTO
     * @return
     * @author Qiang.S
     * @createDate 2018-08-28
     */
    @RequestMapping(path = "/operate/upgrade/hardware/getProjectInfoPage" ,method = RequestMethod.POST)
    Page<OperateProjectInfoVO> getProjectInfoPage(@RequestBody OperateHardwareProjectGetPageDTO operateHardwareProjectGetPageDTO) throws Exception;

    /**
     * <desc>
     *      获取项目楼栋信息
     * <desc/>
     *
     * @param projectId 项目编号
     * @return
     * @author Qiang.S
     * @createDate 2018-08-28
     */
    @RequestMapping(path = "/operate/upgrade/hardware/getBuildInfo" ,method = RequestMethod.POST)
    List<PropertyProjectUnitInfoVO> getBuildInfo(@RequestParam("projectId") String projectId) throws Exception;

    /**
     * <desc>
     *      获取项目单元信息
     * <desc/>
     *
     * @param projectId 项目编号
     * @param buildId 楼栋编号
     * @return
     * @author Qiang.S
     * @createDate 2018-08-28
     */
    @RequestMapping(path = "/operate/upgrade/hardware/getUnitInfo" ,method = RequestMethod.POST)
    List<PropertyProjectUnitInfoVO> getUnitInfo(@RequestParam("projectId") String projectId, @RequestParam("buildId") String buildId) throws Exception;

    /**
     * <desc>
     *      设置项目设备更新时间
     * <desc/>
     *
     * @param projectId 项目编号
     * @param upgradeTime 项目设备升级时间
     * @return
     * @author Qiang.S
     * @createDate 2018-08-28
     */
    @RequestMapping(path = "/operate/upgrade/hardware/setupUpdateTime" ,method = RequestMethod.POST)
    Integer setupUpdateTime(@RequestParam("projectId") String projectId,@RequestParam("upgradeTime") String upgradeTime) throws Exception;

    /**
     * <desc>
     *      设备更新
     * <desc/>
     *
     * @param operateHardwareDeviceUpdateDTO 设备更新信息
     * @return
     * @author Qiang.S
     * @createDate 2018-08-28
     */
    @RequestMapping(path = "/operate/upgrade/hardware/deviceUpdate" ,method = RequestMethod.POST)
    Integer deviceUpdate(@RequestBody OperateHardwareDeviceUpdateDTO operateHardwareDeviceUpdateDTO) throws Exception;


    /**
     *<desc>
     * 通过设备类型查询安装包
     *</desc>
     *
     * @Author  chengshican
     * @Date   2020-11-12 10:37
     * @Param
     * @Return
     * @Exception
     *
     */
    @RequestMapping(path = "/operate/upgrade/hardware/getPackageNameByProductType" ,method = RequestMethod.POST)
    List<OperateUpdateInfoVO> getPackageNameByProductType (@RequestParam("productTypes") String productTypes,@RequestParam("deviceType") String deviceType)throws Exception;




    /**
     *<desc>
     *  通过设备唯一标识符获取云对讲详细信息接口
     *</desc>
     *
     * @Author  chengshican
     * @Date   2020-11-16 14:39
     * @Param
     * @Return
     * @Exception
     *
     */
    @RequestMapping(path = "/operate/upgrade/hardware/getTalkeDetailByDeviceUnique" ,method = RequestMethod.POST)
    OperateDeviceInfoVO getTalkeDetailByDeviceUnique(@RequestParam("deviceUnique") String deviceUnique)throws Exception;


    /**
     *<desc>
     * 通过设备唯一标识符获取云电梯详细信息接口
     *</desc>
     *
     * @Author  chengshican
     * @Date   2020-11-16 14:39
     * @Param
     * @Return
     * @Exception
     *
     */
    @RequestMapping(path = "/operate/upgrade/hardware/getElevatorDetailByDeviceUnique" ,method = RequestMethod.POST)
    OperateDeviceInfoVO getElevatorDetailByDeviceUnique(@RequestParam("deviceUnique") String deviceUnique)throws Exception;



    /**
     *<desc>
     * 通过设备唯一标识符获取云门禁详细信息接口
     *</desc>
     *
     * @Author  chengshican
     * @Date   2020-11-16 14:39
     * @Param
     * @Return
     * @Exception
     *
     */
    @RequestMapping(path = "/operate/upgrade/hardware/getEntranceDetailByDeviceUnique" ,method = RequestMethod.POST)
    OperateDeviceInfoVO getEntranceDetailByDeviceUnique(@RequestParam("deviceUnique") String deviceUnique)throws Exception;


    /**
     *<desc>
     * 通过设备唯一标识符获取群控器详细信息接口
     *</desc>
     *
     * @Author  chengshican
     * @Date   2020-11-16 14:40
     * @Param
     * @Return
     * @Exception
     *
     */
    @RequestMapping(path = "/operate/upgrade/hardware/getClusterDetailByDeviceUnique" ,method = RequestMethod.POST)
    OperateDeviceInfoVO getClusterDetailByDeviceUnique(@RequestParam("deviceUnique")  String deviceUnique)throws Exception;



    /**
     *<desc>
     * 通过设备唯一标识符获取联动器详细信息接口
     *</desc>
     *
     * @Author  chengshican
     * @Date   2020-11-16 14:40
     * @Param
     * @Return
     * @Exception
     *
     */
    @RequestMapping(path = "/operate/upgrade/hardware/getWippenDetailByDeviceUnique" ,method = RequestMethod.POST)
    OperateDeviceInfoVO getWippenDetailByDeviceUnique(@RequestParam("deviceUnique") String deviceUnique)throws Exception;


    /**
     *<desc>
     * 通过设备唯一标识符获取一体式门禁详细信息接口
     *</desc>
     *
     * @Author  chengshican
     * @Date   2020-11-16 14:40
     * @Param
     * @Return
     * @Exception
     *
     */
    @RequestMapping(path = "/operate/upgrade/hardware/getUnibodyDetailByDeviceUnique" ,method = RequestMethod.POST)
    OperateDeviceInfoVO getUnibodyDetailByDeviceUnique(@RequestParam("deviceUnique") String deviceUnique)throws Exception;



    /**
     *<desc>
     * 通过设备唯一标识符获取平板详细信息接口
     *</desc>
     *
     * @Author  chengshican
     * @Date   2020-11-16 14:40
     * @Param
     * @Return
     * @Exception
     *
     */
    @RequestMapping(path = "/operate/upgrade/hardware/getPadDetailByDeviceUnique" ,method = RequestMethod.POST)
    OperateDeviceInfoVO getPadDetailByDeviceUnique(@RequestParam("deviceUnique") String deviceUnique)throws Exception;





    /**
     *<desc>
     * 获取受限设备云电梯
     *</desc>
     *
     * @Author  chengshican
     * @Date   2020-12-07 10:14
     * @Param
     * @Return
     * @Exception
     *
     */
    @RequestMapping(path = "/operate/upgrade/hardware/getSpElevatorList" ,method = RequestMethod.POST)
    List<String> getSpElevatorList()throws Exception;


    /**
     *<desc>
     * 受限设备云群控
     *</desc>
     *
     * @Author  chengshican
     * @Date   2020-12-07 10:16
     * @Param
     * @Return
     * @Exception
     *
     */
    @RequestMapping(path = "/operate/upgrade/hardware/getSpControllerList" ,method = RequestMethod.POST)
    List<String> getSpControllerList()throws Exception;


    /**
     *<desc>
     * 获取受限平板
     *</desc>
     *
     * @Author  chengshican
     * @Date   2020-12-07 10:17
     * @Param
     * @Return
     * @Exception
     *
     */
    @RequestMapping(path = "/operate/upgrade/hardware/getSpPadList" ,method = RequestMethod.POST)
    List<String> getSpPadList()throws Exception;

    /**
     *<desc>
     * 受限设备云门禁
     *</desc>
     *
     * @Author  chengshican
     * @Date   2020-12-07 10:18
     * @Param
     * @Return
     * @Exception
     *
     */
    @RequestMapping(path = "/operate/upgrade/hardware/getSpEntranceList" ,method = RequestMethod.POST)
    List<String> getSpEntranceList()throws Exception;


}
